home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Development Platforms / Apple II / Essentials / MPW IIGS Interfaces / PIIGSIncludes / MIDI.p < prev    next >
Encoding:
Text File  |  1990-04-03  |  5.0 KB  |  116 lines  |  [TEXT/MPS ]

  1. {********************************************
  2. ; File: MIDI.p
  3. ;
  4. ;
  5. ; Copyright Apple Computer, Inc. 1986-90
  6. ; All Rights Reserved
  7. ;
  8. ********************************************}
  9.  
  10. UNIT MIDI;
  11. INTERFACE
  12. USES TYPES;
  13. CONST
  14.  
  15.  
  16. { MIDI }
  17. miToolNum = $0020;  { the tool number of the MIDI Tool Set }
  18. miDrvrFileType = $00BB;  { filetype of MIDI device driver }
  19. miNSVer = $0102;  { minimum version of Note Synthesizer required by MIDI Tool Set }
  20. miSTVer = $0203;  { minimum version of Sound Tools needed by MIDI Tool Set }
  21. miDrvrAuxType = $0300;  { aux type of MIDI device driver }
  22.  
  23. { Error Codes }
  24. miStartUpErr = $2000;  { MIDI Tool Set is not started  }
  25. miPacketErr = $2001;  { incorrect length for a received MIDI command }
  26. miArrayErr = $2002;  { a designated array had an insufficient or illegal size }
  27. miFullBufErr = $2003;  { input buffer overflow }
  28. miToolsErr = $2004;  { the required tools were not started up or had insufficient versions }
  29. miOutOffErr = $2005;  { MIDI output must first be enabled }
  30. miNoBufErr = $2007;  { no buffer is currently allocated }
  31. miDriverErr = $2008;  { the designated file is not a legal MIDI device driver }
  32. miBadFreqErr = $2009;  { the MIDI clock cannot attain the requested frequency }
  33. miClockErr = $200A;  { the MIDI clock value wrapped to zero }
  34. miConflictErr = $200B;  { conflicting processes for MIDI input }
  35. miNoDevErr = $200C;  { no MIDI device driver loaded }
  36. miDevNotAvail = $2080;  { the requested device is not available }
  37. miDevSlotBusy = $2081;  { requested slot is already in use }
  38. miDevBusy = $2082;  { the requested device is already in use }
  39. miDevOverrun = $2083;  { device overrun by incoming MIDI data }
  40. miDevNoConnect = $2084;  { no connection to MIDI }
  41. miDevReadErr = $2085;  { framing error in received MIDI data }
  42. miDevVersion = $2086;  { ROM version is incompatible with device driver }
  43. miDevIntHndlr = $2087;  { conflicting interrupt handler is installed }
  44.  
  45. { MidiClock }
  46. miSetClock = $0000;  { set time stamp clock }
  47. miStartClock = $0001;  { start time stamp clock }
  48. miStopClock = $0002;  { stop time stamp clock }
  49. miSetFreq = $0003;  { set clock frequency }
  50.  
  51. { MidiControl }
  52. miRawMode = $00000000;  { raw mode for MIDI input and output }
  53. miSetRTVec = $0000;  { set real-time message vector }
  54. miPacketMode = $00000001;  { packet mode for MIDI input and output }
  55. miSetErrVec = $0001;  { set real-time error vector }
  56. miStandardMode = $00000002;  { standard mode for MIDI input and output }
  57. miSetInBuf = $0002;  { set input buffer information }
  58. miSetOutBuf = $0003;  { set output buffer information }
  59. miStartInput = $0004;  { start MIDI input }
  60. miStartOutput = $0005;  { start MIDI output }
  61. miStopInput = $0006;  { stop MIDI input }
  62. miStopOutput = $0007;  { stop MIDI output }
  63. miFlushInput = $0008;  { discard contents of input buffer }
  64. miFlushOutput = $0009;  { discard contents of output buffer }
  65. miFlushPacket = $000A;  { discard next input packet }
  66. miWaitOutput = $000B;  { wait for output buffer to empty }
  67. miSetInMode = $000C;  { set input mode }
  68. miSetOutMode = $000D;  { set output mode }
  69. miClrNotePad = $000E;  { clear all notes marked on in the note pad }
  70. miSetDelay = $000F;  { set minimum delay between output packets }
  71. miOutputStat = $0010;  { enable/disable output of running-status }
  72. miIgnoreSysEx = $0011;  { ignore system exclusive input }
  73.  
  74. { MidiDevice }
  75. miSelectDrvr = $0000;  { display device driver selection dialog }
  76. miLoadDrvr = $0001;  { load and initialize device driver }
  77. miUnloadDrvr = $0002;  { shutdown MIDI device, unload driver }
  78.  
  79. { MidiInfo }
  80. miNextPktLen = $0000;  { return length of next packet }
  81. miInputChars = $0001;  { return number of characters in input buffer }
  82. miOutputChars = $0002;  { return number of characters in output buffer }
  83. miMaxInChars = $0003;  { return maximum number of characters in input buffer }
  84. miMaxOutChars = $0004;  { return maximum number of characters in output buffer }
  85. miRecordAddr = $0005;  { return current MidiRecordSeq address }
  86. miPlayAddr = $0006;  { return current MidiPlaySeq address }
  87. miClockValue = $0007;  { return current time stamp clock value }
  88. miClockFreq = $0008;  { return number of clock ticks per second }
  89.  
  90. TYPE
  91. MiBufInfo = RECORD
  92.     bufSize : Integer; { size of buffer (0 for default) }
  93.     address : Ptr; { address of buffer (0 for auto-allocation) }
  94. END;
  95. MiDriverInfoPtr = ^MiDriverInfo;
  96. MiDriverInfo = RECORD
  97.     slot : Integer; { device slot }
  98.     external : Integer; { slot internal (=0) / external (=1) }
  99.     pathname : String[64]; { device driver pathname }
  100. END;
  101. PROCEDURE MidiBootInit   ;
  102. PROCEDURE MidiClock ( funcNum:Integer; arg:Longint)  ;
  103. PROCEDURE MidiControl ( funcNum:Integer; arg:Longint)  ;
  104. PROCEDURE MidiDevice ( funcNum:Integer; driverInfo:MiDriverInfoPtr)  ;
  105. FUNCTION MidiInfo ( funcNum:Integer) : Longint ;
  106. PROCEDURE MidiInputPoll   ;
  107. FUNCTION MidiReadPacket ( arrayAddr:Ptr; arraySize:Integer) : Integer ;
  108. PROCEDURE MidiReset   ;
  109. PROCEDURE MidiShutDown   ;
  110. PROCEDURE MidiStartUp ( userID:Integer; dPageAddr:Integer)  ;
  111. FUNCTION MidiStatus  : Boolean ;
  112. FUNCTION MidiVersion  : Integer ;
  113. FUNCTION MidiWritePacket ( arrayAddr:Ptr) : Integer ;
  114. IMPLEMENTATION
  115. END.
  116.